pub trait Summary {
    fn summarize1(&self) -> String;
    fn summarize2(&self) -> String;
}

pub struct NewArticle {
    pub headline: String,
    pub location: String,
    pub author: String,
    pub content: String,
}

impl Summary for NewArticle {
    fn summarize1(&self) -> String {
        format!("{},by {} ({})", self.headline, self.author, self.location)
    }

    fn summarize2(&self) -> String {
        unimplemented!()
    }
}

pub fn main() {
    let tweet = NewArticle {
        headline: "aaa".to_string(),
        location: "bbb".to_string(),
        author: "ccc".to_string(),
        content: "ddd".to_string(),
    };
    println!("{}", tweet.summarize1());
}